package com.coustemview.qianfeng.huaqiangbeistore.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.coustemview.qianfeng.huaqiangbeistore.R;
import com.coustemview.qianfeng.huaqiangbeistore.application.Myapplication;
import com.squareup.picasso.Picasso;

/**
 * Created by mingma on 2016/9/1.
 */
public class Fragment_oversear_shopdetails1 extends Fragment {
    private ImageView image_fragmentoversear_shopdetails1,image_fragmentoversear_shopdetails2,image_fragmentoversear_shopdetails3,image_fragmentoversear_shopdetails4,image_fragmentoversear_shopdetails5;
    private Myapplication application;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_oversear_shopdetails1, null);
            initView(view);
            initData();
        return view;
    }
    private void initData() {
        application = (Myapplication) getActivity().getApplication();
        String imagepath1 = application.getImagepath1();
        String imagepath2 = application.getImagepath2();
        String imagepath3 = application.getImagepath3();
        String imagepath4 = application.getImagepath4();
        String imagepath5 = application.getImagepath5();
        Picasso.with(getActivity()).load(imagepath1).into(image_fragmentoversear_shopdetails1);
        Picasso.with(getActivity()).load(imagepath2).into(image_fragmentoversear_shopdetails2);
        Picasso.with(getActivity()).load(imagepath3).into(image_fragmentoversear_shopdetails3);
        Picasso.with(getActivity()).load(imagepath4).into(image_fragmentoversear_shopdetails4);
        Picasso.with(getActivity()).load(imagepath5).into(image_fragmentoversear_shopdetails5);
    }

    private void initView(View view) {
        image_fragmentoversear_shopdetails1= (ImageView) view.findViewById(R.id.image_fragmentoversear_shopdetails1);
        image_fragmentoversear_shopdetails2= (ImageView) view.findViewById(R.id.image_fragmentoversear_shopdetails2);
        image_fragmentoversear_shopdetails3= (ImageView) view.findViewById(R.id.image_fragmentoversear_shopdetails3);
        image_fragmentoversear_shopdetails4= (ImageView) view.findViewById(R.id.image_fragmentoversear_shopdetails4);
        image_fragmentoversear_shopdetails5= (ImageView) view.findViewById(R.id.image_fragmentoversear_shopdetails5);
    }
}
